﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Services;
namespace MBS
{
    public partial class Trailers : System.Web.UI.Page
    {

        public static string TrailerUrl;
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
        }

        protected void Button1_Click1(object sender, EventArgs e)
        {
            MBSBLC.BLC testobj = new MBSBLC.BLC();

            string u = hdnTest.Value.ToString();

            MBSVO.MovieVO movievo = testobj.GetMovieIDByImageUrl(u);

            List<MBSVO.MovieVO> movievolist =new List<MBSVO.MovieVO>();
            movievolist.Add(movievo);


            //GridView1.DataSourceID = null;
            GridView1.DataSource = movievolist;
            GridView1.DataBind();

            //Label1.Text = movievo.MovieID.ToString();
            //Label2.Text = movievo.MovieTitle;
            //Label3.Text = movievo.Rating.ToString();
            //Label4.Text = movievo.TrailerURL;

        }

        [WebMethod]
        public static string showTrailers(string imageID)
        {
            MBSBLC.BLC testobj = new MBSBLC.BLC();

            MBSVO.MovieVO movievo = testobj.GetMovieIDByImageUrl(imageID);

            return movievo.TrailerURL;
        }
    }
}